package com.woniuxy.hotel.user.pojo;


import javax.validation.constraints.NotBlank;

import java.io.Serializable;
import java.util.Collection;

public class User implements Serializable{
    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private Integer id;

    private String account;

    private String phone;

    @NotBlank
    private String password;
    
    private String email;

    private Collection<Role> roles;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public Collection<Role> getRoles() {
		return roles;
	}

	public void setRoles(Collection<Role> roles) {
		this.roles = roles;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public User(Integer id, String account, String phone, @NotBlank String password, String email,
			Collection<Role> roles) {
		super();
		this.id = id;
		this.account = account;
		this.phone = phone;
		this.password = password;
		this.email = email;
		this.roles = roles;
	}

	public User() {
		super();
	}

	@Override
	public String toString() {
		return "User [id=" + id + ", account=" + account + ", phone=" + phone + ", password=" + password + ", email="
				+ email + ", roles=" + roles + "]";
	}



}